/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package receptorudp;

import java.io.IOException;
import java.net.DatagramPacket;

/**
 *
 * @author Diego
 */
public class ReceptorUDP
{
  
    public static void main(String[] args) throws IOException
    {
        Receptor r = new Receptor();
        System.out.println("Iniciando receptor...");
        
        while (true)
        {
            DatagramPacket a = r.receber();
            
            String t = new String(a.getData());
            
            System.out.println("["+a.getAddress().getHostAddress()+"]"+t.trim());
        }
        
        
    }
}
